-- GENERATED SPELL FOR [Night Mistress] --


function spell0_16460(pUnit, Event) --@Impending Betrayal,Self--
pUnit:FullCastSpellOnTarget(29491,pUnit)
pUnit:RegisterEvent('Sorts_16460', 10500, 1)
end

function spell1_16460(pUnit, Event) --@Searing Pain,n/a--
pUnit:FullCastSpellOnTarget(30358,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16460', 1000, 1)
end

function spell2_16460(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(29487,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16460', 1500, 1)
end

function Sorts_16460(pUnit, Event)
local choix_sorts_16460 = math.random(0, 2)
if choix_sorts_16460 == 0 then
pUnit:RegisterEvent('spell0_16460', 1, 1)
end
if choix_sorts_16460 == 1 then
pUnit:RegisterEvent('spell1_16460', 1, 1)
end
if choix_sorts_16460 == 2 then
pUnit:RegisterEvent('spell2_16460', 1, 1)
end
end

function mob16460_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16460', math.random(1500, 3000), 1)
end

function mob16460_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16460_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16460_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16460, 1, 'mob16460_Action')
RegisterUnitEvent(16460, 2, 'mob16460_Leave')
RegisterUnitEvent(16460, 3, 'mob16460_Kill')
RegisterUnitEvent(16460, 4, 'mob16460_Die')
